package cn.itcast.feign.config;

import cn.itcast.feign.client.fallback.UserClientFallbackFactory;
import feign.Logger;
import org.springframework.context.annotation.Bean;

public class DefaultFeignConfig {
    @Bean
    public Logger.Level loggerLevel(){
        // NONE: 没有日志
        // BASIC: 只有请求和响应行
        // HEADERS: 请求和响应行、请求和响应头
        // FULL: 请求和响应行、请求和响应头、请求和响应体
        return Logger.Level.BASIC;
    }
    @Bean
    public UserClientFallbackFactory userClientFallbackFactory(){
        return new UserClientFallbackFactory();
    }
}
